# Maintainer: Nicholas Lee <lnzju@baidu.com>
pkgname=fcitx-svn-ibus
pkgver=248
pkgrel=1
url=http://code.google.com/p/fcitx
pkgdesc="fcitx with pyPhrase.org from ibus, perfect as a PinYin IM"
arch=('i686' 'x86_64')
license=('GPL')
depends=('libxft' 'libxpm')
makedepends=('automake' 'gettext' 'libxtst' 'xextproto')
provides=('fcitx-svn')
replaces=('fcitx-svn')
source=("pyPhrase.tar.bz2::http://fcitx.googlecode.com/issues/attachment?aid=2742738430722187796&name=pyPhrase.org.tar.bz2")

_svntrunk=http://fcitx.googlecode.com/svn/trunk
_svnmod=fcitx-svn

build() {
	## start building
	cd $startdir/src	
	if [ -d $_svnmod ]; then
		cd $svnmod && svn up && cd ..
	else
		svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
	fi
	msg "SVN checkout done or server timeout"

	msg "Starting make..."
	rm -rf $_svnmod-build
	cp -r $_svnmod $_svnmod-build
	cd $_svnmod-build
	mv -f $startdir/src/pyPhrase.org data/pyPhrase.org
	./autogen.sh
	./configure --prefix=/usr --enable-xft
	make || return 1
	make DESTDIR=$startdir/pkg install || return 1
}
